package client;

import ihm.IhmLogin;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import server.GestionnaireConnection;


public class Client {

	public static void main(String arg[]){
		
		try {
			
			StarCafeRMI objServer;
			objServer = (StarCafeRMI) Naming.lookup("rmi://localhost:8809/Starcafe");
			
			objServer.connexionBDD();
			//objServer.affichageProduits();
			
			IhmLogin ihm = new IhmLogin(objServer);
			ihm.setVisible(true);
			ihm.setSize(ihm.getPreferredSize());
			
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotBoundException e) {
			e.printStackTrace();
		}
		
	}
	
}
